package com.zlzxm.shoesmarket.view.activity;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;

import com.zlzxm.shoesmarket.util.ZViewHelp;
import com.zlzxm.shoesmarket.util.toasty.ToastyEvent;
import com.zlzxm.shoesmarket.util.toasty.ToastyUtil;
import com.zlzxm.shoesmarket.view.activity.manage.ActivityIndex;

/**
 * CREATE BY zlzxm ON 4/7/21
 */
public class BaseActivity extends FragmentActivity implements ToastyEvent {


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
        initViewModule();
        initData();

    }

    protected void initView(){


    }


    protected void initViewModule(){


    }


    protected void initData(){


    }


    @Override
    public void infoToast(String msg) {

        ToastyUtil.infoToast(this,msg);
    }

    @Override
    public void errorToast(String msg) {

        ToastyUtil.errorToast(this,msg);
    }

    @Override
    public void succeedToast(String msg) {

        ToastyUtil.succeedToast(this,msg);
    }

    @Override
    public void warningToast(String msg) {
        ToastyUtil.warningToast(this,msg);
    }

    @Override
    public void normalToast(String msg) {
        ToastyUtil.normalToast(this,msg);
    }


    public void toLogin(){

        ActivityIndex.startACLogin(this);

    }
}
